package com.sanmu.homework;

import com.sanmu.bean.Car;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class homework02 {
    public static void main(String[] args) {
        ApplicationContext ioc =
                new ClassPathXmlApplicationContext("car_beans.xml");
        Car car = ioc.getBean("com.sanmu.bean.Car#0", Car.class);
        System.out.println(car.getId()+" "+car.getName()+" "+car.getPrice());


        System.out.println("ok");

 /*       Car car =  ioc.getBean("car", Car.class);
        System.out.println(car.getId()+" "+car.getName()+" "+car.getPrice());*/

    }
}
